package com.grad.why.studentsystem.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.grad.why.studentsystem.domain.Nation;
import com.grad.why.studentsystem.mapper.NationMapper;
import com.grad.why.studentsystem.service.ClassesTableService;
import com.grad.why.studentsystem.service.NationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;


import java.util.List;

@Component
@Service(interfaceClass = NationService.class)
@Transactional
public class NationServiceImpl implements NationService{
    @Autowired
    private NationMapper nationMapper;


    @Override
    public List<Nation> getNations() {
        try{
            return nationMapper.getNations();
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }
}
